<%--
  Created by IntelliJ IDEA.
  User: 14136
  Date: 2024/11/30
  Time: 23:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<!DOCTYPE html>
<html>
<head>
    <title>搜索结果</title>
</head>
<body>
<h2>搜索结果</h2>
<ul>
    <%-- 迭代显示搜索结果 --%>
    <%
        List<String> results = (List<String>) request.getAttribute("searchResults");
        if (results != null) {
            for (String result : results) {
    %>
    <li><a href="phone.jsp?id=<%= result %>"><%= result %></a></li>
    <%
        }
    } else {
    %>
    <li>没有找到结果。</li>
    <%
        }
    %>
</ul>
</body>
</html>